<?php 
get_header();
?>

<div id="content" class="narrowcolumn">

<?php
if ($photo) {
		?>
<h2><?php echo "<a href=\"" . $photo->url . $photo->metadata['file'] . "\" target=\"_blank\">" . $photo->title . "</a>";?></h2>
<div id="photo">
<?php if ($photo->description) {?>
<div id="description">
    <?php echo  apply_filters('the_content', $photo->description); ?>
</div>
<?php } ?>
<br /><?php if ($photo->metadata['width'] > 400) echo "<a href=\"" . $photo->url . $photo->metadata['file'] . "\" target=\"_blank\">";?>
<img src="<?php echo $photo->url . $photo->metadata['file'] ;?>" width="<?php echo ($photo->metadata['width'] > 400) ? "400" : $photo->metadata['width'] ;?>"/><?php if ($photo->metadata['width'] > 400) echo "</a>";?>
</div>
<?php
} else {
?>

		<h2><?php _e('No image found') ;?></h2>
		<p> <?php echo "<a href=\""  . get_bloginfo('siteurl') . "/" . $_SERVER['REQUEST_URI'] . "/" . $albumID . "\">" . __('Back to the album') . "</a>"; ?></p>
<?
}

?>

</div>

<?php
get_sidebar();
get_footer();
?>